package SV_UMC_EXIT;

public class Example {
    public void doPost(HttpServletRequest request,
                       HttpServletResponse response) throws IOException,
            ServletException {
        doProcessRequest(request, response);
    }
    public void doGet(HttpServletRequest request,
                      HttpServletResponse response) throws IOException,
            ServletException {
        doProcessRequest(request, response);
    }
    // called from servlet
    private void doProcessRequest(HttpServletRequest request,
                                  HttpServletResponse response) throws IOException,
            ServletException {
        if ("shutdown".equals(request.getParameter("action"))) {
            System.exit(1);
        }
        doCreatePage(request, response);
        // ...
    }
}
